Skip to main content

All Questions

1vote
1answer
203views

Maximum Width binary tree

Here is my code for the LeetCode problem For a given binary tree, find the maximum width of the binary tree. The width of one level is defined as the length between the end-nodes even if there are <...
MrJoe's user avatar
  • 2,133
8votes
2answers
2kviews

Word-Ladder solver in Python 3

Follow-up to Python program to find a word ladder transforming "four" to "five" I'm trying to write a program to solve a word ladder puzzle to brush up on my Python. For those who ...
Alex F's user avatar
1vote
1answer
487views

Python program for Word Search II

This is a Leetcode problem - Given a 2D board and a list of words from the dictionary, find all words in the board. Each word must be constructed from letters of a sequentially adjacent ...
Justin's user avatar
  • 2,585
2votes
1answer
2kviews

Given a binary tree, find the maximum path sum

This is a leetcode.com problem. For this problem, a path is defined as any sequence of nodes from some starting node to any node in the tree along the parent-child connections. The path must ...
Stack crashed's user avatar
1vote
1answer
2kviews

Generating and finding parent nodes in a post-order tree

Given a height h and list q of integers, list the parent node of each element in q, if nodes are read in post-order sequence ...
Jake Steele's user avatar
6votes
2answers
957views

HackerRank Binary search tree validation

From here: ...
enderland's user avatar
4votes
1answer
174views

Counting increasing subsequences with a "hacker's" Binary Index Tree

This is an \$O(n \sqrt n)\$ solution to the the following problem: Given a sequence, compute the number of non-empty increasing subsequences The algorithm is to compute ...
Elliot Gorokhovsky's user avatar

close